<?php

/**
 * EmsFooter form.
 *
 * @package    ems1
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfDoctrineFormTemplate.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class EmsFooterForm extends BaseEmsFooterForm
{
    public function configure()
    {
        unset(
            $this['created_at'], $this['updated_at'], $this['portal_id'],
            $this['banner_id'], $this['html']
        );

        $this->widgetSchema['uses_banner'] = new sfWidgetFormChoice(array(
            'choices'  => Doctrine_Core::getTable('EmsFooter')->getBooleanOptions(),
            'multiple' => false,
            'expanded' => true,
        ));

        $this->widgetSchema['uses_banner'] = new sfWidgetFormChoice(array(
            'choices'  => Doctrine_Core::getTable('EmsFooter')->getBooleanOptions(),
            'multiple' => false,
            'expanded' => true,
        ));

        $this->widgetSchema['uses_banner']->setLabel('Utiliza banner');

        $this->widgetSchema['uses_breadcrumb'] = new sfWidgetFormChoice(array(
            'choices'  => Doctrine_Core::getTable('EmsFooter')->getBooleanOptions(),
            'multiple' => false,
            'expanded' => true,
        ));

        $this->widgetSchema['uses_breadcrumb'] = new sfWidgetFormChoice(array(
            'choices'  => Doctrine_Core::getTable('EmsFooter')->getBooleanOptions(),
            'multiple' => false,
            'expanded' => true,
        ));

        $this->widgetSchema['uses_breadcrumb']->setLabel('Utiliza mapa de navegación');

        $this->widgetSchema['html'] = new sfWidgetFormTextareaTinyMCE(array(
            'config' => 'skin : "o2k7",theme_advanced_disable: "anchor,image,cleanup,help"',
            ));

        $this->widgetSchema['html']->setLabel('Pie de página');

        $this->validatorSchema['html']= new sfValidatorString(
                array('max_length' => 255, 'required' => false),
                array('max_length' => 'El mensaje excede el máximo de caracteres permitido, 255 caracteres máximo.'));
        /*->setMessage('max_length', 'El mensaje excede el máximo de caracteres permitido, 255 caracteres máximo.')*/
    }
}
